package com.jiruan.invoicemanagementsystem.service.imp;

import com.jiruan.invoicemanagementsystem.dao.IOrderDao;
import com.jiruan.invoicemanagementsystem.dao.Imp.IOrderDaoImp;
import com.jiruan.invoicemanagementsystem.pojo.Order;
import com.jiruan.invoicemanagementsystem.service.IOrderService;
import com.jiruan.invoicemanagementsystem.util.PageHelper;
import com.jiruan.invoicemanagementsystem.vo.CanIssuedInvoicesShow;

import java.util.ArrayList;

public class IOrderServiceImp implements IOrderService {


     private IOrderDao iod=new IOrderDaoImp();

//，用于获取‘可开具发票’的数量，最终返回一个整数结果
    public int getCountOfCanIssuedInvoice(){
        return iod.getInVoicedCount();
    }



    //分页展示可以开具发票的订单信息 - (全查): -> 即
//                              1.订单表中开票状态为：未开票
//                                          或
//                              2.开票记录表中处理状态为: 已作废
    public ArrayList<Order> getCanIssuedInvoice(PageHelper pageHelper){
        return iod.getInVoicedList(pageHelper);
    }


    //接受order id
    public boolean receivenvoice(Integer id){
        return iod.receivenvoice(id)>0;
    }


}
